﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Remoting.Proxies;
using System.Text;
using System.Threading.Tasks;

namespace Aragorn.SOA.Infratructure.AOP
{
    public class AOPAttribute:ProxyAttribute
    {
        public override MarshalByRefObject CreateInstance(Type serverType)
        {
            AOPProxy realProxy = new AOPProxy(serverType, base.CreateInstance(serverType));
            return realProxy.GetTransparentProxy() as MarshalByRefObject;

        }
    }
}
